load("@rules_rust//rust:defs.bzl", "rust_doc_test", "rust_library", "rust_test")

package(default_visibility = ["//visibility:public"])

rust_library(
    name = "tree_deserializer",
    srcs = glob(["src/**"]),
    crate_name = "tree_deserializer",
    version = "0.9.0",
    deps = [
        # Keep sorted.
        "//rs/crypto/tree_hash",
        "@crate_index//:leb128",
        "@crate_index//:serde",
    ],
)

MACRO_DEV_DEPENDENCIES = [
    # Keep sorted.
    "@crate_index//:proptest-derive",
    "@crate_index//:test-strategy",
]

rust_test(
    name = "tree_deserializer_test",
    crate = ":tree_deserializer",
    proc_macro_deps = MACRO_DEV_DEPENDENCIES,
    deps = [
        # Keep sorted.
        "@crate_index//:maplit",
        "@crate_index//:proptest",
    ],
)

rust_doc_test(
    name = "tree_deserializer_doc_test",
    crate = ":tree_deserializer",
)
